package com.example.controller.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Evaluations对象", description="评论表")
public class EvaluationsVo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "评论者ID")
    private Integer commenterId;

    @ApiModelProperty(value = "内容类型")
    private String contentType;


    @ApiModelProperty(value = "内容ID")
    private Integer productId;

    @ApiModelProperty(value = "评论内容")
    private String content;

    @ApiModelProperty(value = "点赞数")
    private Integer upvoteList;

    @ApiModelProperty(value = "评论时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    private Integer fatherId;

    private List<EvaluationsVo> children;

    private String userName;

    private String userAvatar;

    private String productName;

}

